package com.lagou.application;

import org.apache.catalina.LifecycleException;
import org.apache.catalina.connector.Connector;
import org.apache.catalina.startup.Tomcat;

import javax.servlet.ServletException;

public class SpringApplication {

    public static void run(Class<?> primarySource, String... args) {
        //创建tomcat
        Tomcat tomcat = new Tomcat();
        try {

            tomcat.addWebapp("/", "E:\\");
            //启动tomcat
            tomcat.start();
            tomcat.getServer().await();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
